/*
 * @Author: wanlixin
 * @Date: 2019-10-05 10:41:30
 * @LastEditors: wanlixin
 * @LastEditTime: 2019-10-05 13:26:14
 * @Description: 用于控制台展示提示信息
 */

export const warn = function(msg, componentName) {
  /* istanbul ignore if */
  if (process.env.NODE_ENV !== 'production') {
    const component = componentName ? `<${componentName}> ` : '';
    console.error(`[Grimm warn]: ${component}${msg}`);
  }
};

export const tip = function(msg, componentName) {
  if (process.env.NODE_ENV !== 'production') {
    const component = componentName ? `<${componentName}> ` : '';
    console.warn(`[Grimm tip]: ${component}${msg}`);
  }
};
